package com.threegroup.admin.dao;


import com.threegroup.admin.dto.DishDTO;
import com.threegroup.admin.entity.DishEntity;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DishEntityMapper {
    int deleteByPrimaryKey(Long id);

    int insert(DishEntity record);

    int insertSelective(DishEntity record);

    DishEntity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(DishEntity record);

    int updateByPrimaryKey(DishEntity record);
    DishEntity queryDishByName(String name);
    int insertSelectiveDisdto(DishDTO dishDTO);

    DishDTO queryDishByNameNoId(DishDTO dishDTO);

    int updateByPrimaryKeySelectiveDIshDto(DishDTO dishDTO);

    int deleteDishById(Long dishId);

    List<DishDTO> queryDishByAll(DishDTO dishDTO);

    DishDTO queryDishById(Long id);

    List<DishEntity> queryAll(@Param("order") String order, @Param("orderField") String orderField,@Param("name") String name);

    int updateStatus(DishEntity dishEntity);


}